import logging

from selenium import webdriver
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.common.by import By
from  Base.Base import Base
from Page.login1 import Page1
import traceback
from time import sleep
class Page2(Page1):

    yhgl=(By.XPATH,'/html/body/div[1]/div[2]/div[2]/div[2]/div[5]/h2')

    yhxx=(By.XPATH,'//*[@id="sidebar"]/div[2]/div[6]/ul/li/div/a')




    def user_yh(self):
        '''
        选择用户管理
        :return:
        '''
        try:
            self.click(self.yhgl)
        except Exception as e:
            logging.info(traceback.format_exc(),e)

    def user_yhx(self):
        '''
        查看详细信息
        :return:
        '''
        try:
            self.click(self.yhxx)
        except Exception as e:
            logging.info(traceback.format_exc(), e)

    # # 用户管理模块
    # def add(self):
    #     self.user_yh()
    #     sleep(2)
    #     self.user_yhx()
    #     sleep(2)
